﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using com.ClickCricket.dal;

/// <summary>
/// Summary description for SeriesService
/// </summary>
namespace com.ClickCricket.bll
{
    public class SeriesService
    {
        private static SeriesService instance;

        public static SeriesService Instance 
        {
            get
            {
                if (instance == null)
                {
                    instance = new SeriesService();
                }
                return instance;
            }
        }

        private readonly ISeriesProvider SeriesProvider;

        public SeriesService(ISeriesProvider SeriesProvider)
        {
            this.SeriesProvider = SeriesProvider;
        }

        public SeriesService()
            : this(new SeriesLinqProvider())
        {
         
        }

        public List<Series> getOnGoingSeriesByCountry(int cID)
        {
            return SeriesProvider.getOnGoingSeriesByCountry(cID);
        }

        public List<Series> getOnGoingSeries()
        {
            return SeriesProvider.getOnGoingSeries();
        }

        public List<Series> getUpComingSeries()
        {
            return SeriesProvider.getUpComingSeries();
        }

        public List<Series> getUpComingSeriesByCountry(int cID)
        {
            return SeriesProvider.getUpComingSeriesByCountry(cID);
        }

        public Series getSeries(int seriesID)
        {
            return SeriesProvider.getSeries(seriesID);
        }

        public List<Series> getCompletedByCountry(int cID)
        {
            return SeriesProvider.getCompletedByCountry(cID);
        }
    }
}
